# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1Dataset do
  @moduledoc """
  Dataset is the resource to hold your data. You can request multiple labeling tasks for a dataset while each one will generate an AnnotatedDataset.

  ## Attributes

  *   `blockingResources` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The names of any related resources that are blocking changes to the dataset.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the dataset is created.
  *   `dataItemCount` (*type:* `String.t`, *default:* `nil`) - Output only. The number of data items in the dataset.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. User-provided description of the annotation specification set. The description can be up to 10000 characters long.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the dataset. Maximum of 64 characters.
  *   `inputConfigs` (*type:* `list(GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1InputConfig.t)`, *default:* `nil`) - Output only. This is populated with the original input configs where ImportData is called. It is available only after the clients import data to this dataset.
  *   `lastMigrateTime` (*type:* `DateTime.t`, *default:* `nil`) - Last time that the Dataset is migrated to AI Platform V2. If any of the AnnotatedDataset is migrated, the last_migration_time in Dataset is also updated.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Dataset resource name, format is: projects/{project_id}/datasets/{dataset_id}
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :blockingResources => list(String.t()) | nil,
          :createTime => DateTime.t() | nil,
          :dataItemCount => String.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :inputConfigs =>
            list(
              GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1InputConfig.t()
            )
            | nil,
          :lastMigrateTime => DateTime.t() | nil,
          :name => String.t() | nil
        }

  field(:blockingResources, type: :list)
  field(:createTime, as: DateTime)
  field(:dataItemCount)
  field(:description)
  field(:displayName)

  field(:inputConfigs,
    as: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1InputConfig,
    type: :list
  )

  field(:lastMigrateTime, as: DateTime)
  field(:name)
end

defimpl Poison.Decoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1Dataset do
  def decode(value, options) do
    GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1Dataset.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DataLabeling.V1beta1.Model.GoogleCloudDatalabelingV1beta1Dataset do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
